package cn.itcast.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ProceedingJoinPoint {

    private Object[] args;
    private String methodName;
    private Object target;
    private Method method;


    public Object proceed() throws InvocationTargetException, IllegalAccessException {
           return method.invoke(target, args);
    }

    public Object proceed( Object[] args) throws InvocationTargetException, IllegalAccessException {
        return method.invoke(target, args);
    }

}
